﻿cmake_minimum_required(VERSION 3.16)

project(CameraToupCam VERSION 2.0.0 LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets LinguistTools Multimedia)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets LinguistTools Multimedia)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/..)

find_package(FluoCam REQUIRED)
add_library(CameraFluo MODULE
    ../Camera_global.h
    CameraFluo.h
    CameraFluo.cpp
    ../IndustryCamera.h
    DialogCameraSetup.h
    DialogCameraSetup.ui
    DialogCameraSetup.cpp
    #CameraFluoSettingDialog.ui
    #CameraFluoImageProcessing.h
    CameraFluoImageProcessing.cpp
    CameraFactory.h
    CameraFactory.cpp
)

target_link_libraries(CameraFluo PUBLIC ${FluoCam_LIBRARIES})
target_link_libraries(CameraFluo PUBLIC Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia CameraCommon)
target_include_directories(CameraFluo PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} FluoCam_INCLUDE_DIRS)
target_compile_definitions(CameraFluo PRIVATE CAMERA_LIBRARY)


